<template>
  <div>
    <div ref="myDiv" class="radar-echart"></div>
  </div>
</template>

<script>
//回顾以前如何使用echarts
//1.在html的script中的src里引入echarts.js
//2.挂载的 容器，并且给id
//3.实例化一个echarts实例  let echart = echarts.init(document.getElementById(id))
//4.绘制（给配置  echarts.setOption(配置)）

import * as Echarts from "echarts";
import Radartree from "./radartree";
export default {
  name: "againradartree",
  mounted() {
    this.echarts = Echarts.init(this.$refs.myDiv);
    this.echarts.setOption(Radartree);
    // this.initData();
  },
  // methods: {
  //   initData() {
  //     setTimeout(() => {
  //       //resData是服务端返回的数据
  //       let resData = [];
  //       //重新绘制
  //       Radartree.series[0].data = resData;
  //       this.echarts.setOption(Radartree);
  //     }, 1000);
  //   },
  // },
};
</script>

<style lang="scss" scoped>
.radar-echart {
  width: 1255px;
  height: 400px;
}
</style>
